﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.models {
    import flash.events.*;
    import net.wooga.pets.utils.*;

    public class SlotModule {

		[Inject]
        public var eventdispatcher:IEventDispatcher;
        protected var m_slots:Array;
        protected var m_maxNumberOfItems:int;
        protected var m_isActive:Boolean;
        protected var m_id:int;
        protected var m_modules:Array;

        public function SlotModule(_arg1:int){
            this.m_id = _arg1;
            this.m_slots = [];
            this.m_modules = [];
            this.m_isActive = false;
        }
        public function getFirstSlot():Slot{
            return (this.m_slots[0]);
        }
        public function set modules(_arg1:Array):void{
            this.m_modules = _arg1;
        }
        public function addSlot(_arg1:Slot):void{
            this.m_slots.push(_arg1);
        }
        public function get isActive():Boolean{
            return (this.m_isActive);
        }
        public function set isActive(_arg1:Boolean):void{
            this.m_isActive = _arg1;
        }
        public function containsSlot(_arg1:Slot):Boolean{
            return (Arrays.contains(this.m_slots, _arg1));
        }
        public function areAllSlotsOccupied():Boolean{
            var _local1:Slot;
            var _local2:int;
            while (_local2 < this.m_slots.length) {
                _local1 = this.m_slots[_local2];
                if (_local1.isFree()){
                    return (false);
                };
                _local2++;
            };
            return (true);
        }
        public function isFull():Boolean{
            return ((this.m_slots.length == this.m_maxNumberOfItems));
        }
        public function get id():int{
            return (this.m_id);
        }
        public function toString():void{
            l("=======");
            l(("id: " + this.m_id));
            l(("slot IDs: " + this.m_slots));
        }

    }
}//package net.wooga.pets.models 
